package movie.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import movie.entity.Consumer;
import movie.entity.Film;
import movie.mapper.FilmMapper;
import movie.service.FilmInsertService;



@Service
public class FilmInsertServiceImpl implements FilmInsertService {
	@Autowired
	private FilmMapper filmMapper;
	
	@Override
	public int insertFilm(Film film) {
		
		return filmMapper.insert(film);
	}
	
	@Override
	public int checkByFilmName(String filmName) {
		
		Film film = filmMapper.findByFilmNameOne(filmName);
		if( null != film ) {
			return 1;
		}
		return 0;
	}
}
